<?php

namespace App\Models;

use Illuminate\Database\Eloquent\Model;
use Illuminate\Database\Eloquent\SoftDeletes;
use Illuminate\Support\Facades\DB;
use App\Models\courseClass;

class Users extends Model
{
    use SoftDeletes;
    protected $table = 'users';

	public function update(Request $request,$id){
			return $this->where("id",$id)->update(['state' => 1]);
	}
	//一对多关联courseClass表
	public function courseClass(){
		return $this->hasMany('CourseClass', 'user_id', 'id');
	}
	
}

